
DFRobotMaqueenPlus.I2CInit()
DFRobotMaqueenPlus.mototRun(Motors.ALL, Dir.CW, 100)
basic.pause(1000)
DFRobotMaqueenPlus.mototStop(Motors.ALL)
basic.pause(1000)
DFRobotMaqueenPlus.setRGBLight(RGBLight.RGBL, Color.RED)
basic.pause(1000)
DFRobotMaqueenPlus.setRGBLight(RGBLight.RGBL, Color.YELLOW)
basic.pause(1000)
DFRobotMaqueenPlus.setRGBLight(RGBLight.RGBL, Color.OFF)
basic.pause(1000)
DFRobotMaqueenPlus.servoRun(Servos.S1, 90)
basic.pause(1000)
basic.forever(function () {
    serial.writeValue("Speed", DFRobotMaqueenPlus.readSpeed(Motors1.M1))
    serial.writeValue("direction", DFRobotMaqueenPlus.readDirection(Motors1.M1))
    serial.writeValue("patrol", DFRobotMaqueenPlus.readPatrol(Patrol.L1))
    serial.writeValue("ultrasonic", DFRobotMaqueenPlus.ultraSonic(PIN.P0, PIN.P0))
    serial.writeValue("voltage", DFRobotMaqueenPlus.readPatrolVoltage(Patrol.L1))
})
